package com.zkyc.framework.user.Util;

import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;

/**
 * @author bing.bai
 * @create 2022/6/2
 */
public class TokenUserUtil {
    public static String getCurrentUserId(){
        ServletRequestAttributes sra = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
        String userId = sra.getRequest().getHeader("userId");
        return userId;
    }
}

    